
package operazioni_database;

import java.sql.*;

/**
 *
 * @author ste
 */

public class Connessione {

 public static Connection getConnection() throws ClassNotFoundException, SQLException {
 Connection conn = null;
 Class.forName("com.mysql.jdbc.Driver");
 //conn = DriverManager.getConnection("jdbc:mysql://host:porta/db?user=user&password=pass");
 conn = DriverManager.getConnection(
                    "jdbc:mysql://127.0.0.1/protciv01", "ste", "ws");
 return conn;
 }
}
